// cover some element-ui styles
:root:root{
  //--el-border-radius-small: 3px;
  //--el-border-radius-base: 6px;
  //--el-border-radius-large: 12px;
  //--el-border-radius-round: 999px;
  //--el-border-radius-circle: 50%;

  --el-menu-item-height:43px !important;

  --el-table-th-bg:#fafafa;
  --el-table-th-color:rgba(0, 0, 0, 0.88);


  --theme-light-el-menu-hover-bg: var(--el-color-primary-light-9);
  --theme-light-el-menu-text-color: var(--el-color-primary);

  --el-input-bg: rgba(243, 243, 243, .76);
  --el-input-bg-hover:rgb(228, 228, 228) ;
  --el-input-bg-active: rgb(215, 215, 215);
  --el-input-boxshadow: 0px 1px 2px rgba(0, 0, 0, .1);

  --el-card-padding: 15px 20px 20px 20px ;

  --el-message-content-color: #666;
  &.dark{
    --el-table-th-bg:#1d1d1d;
    --el-table-th-color:rgba(255, 255, 255, 0.85);

    --theme-light-el-menu-hover-bg:hsl(216 5% 19%);
    --theme-light-el-menu-text-color: hsl(0 0% 95%);

    --el-input-bg:#2f313b;
    --el-input-bg-hover: #3c3e4b;
    --el-input-bg-active: #1d1d26;
    --el-input-boxshadow: 0px 1px 2px rgba(0, 0, 0, .1);

    --el-message-content-color: #fff;
  }
}
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

.el-upload {
  input[type="file"] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}

.cell {
  .el-tag {
    margin-right: 0px;
  }
}

.small-padding {
  .cell {
    padding-left: 5px;
    padding-right: 5px;
  }
}

.fixed-width {
  .el-button--mini {
    padding: 7px 10px;
    width: 60px;
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;

    .el-tag {
      margin-right: 0px;
    }
  }
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  //transform: none;
  //left: 0;
  //position: relative;
  //margin: 0 auto;
}
.el-dialog__body {
  padding: 4px;
}
// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block
  }
}

// fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner {
  display: inline-flex !important;
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}

.el-menu--collapse
  > div
  > .el-submenu
  > .el-submenu__title
  .el-submenu__icon-arrow {
  display: none;
}

.el-dropdown .el-dropdown-link{
  color: var(--el-color-primary) !important;
}

//el-menu
.el-menu-item{
  margin: 0 6px 10px 6px !important;
}
.el-menu-dark{
  .sub-menu-title-noDropdown,
  .el-sub-menu__title {
    &:hover {
      background-color: hsl(216 5% 19%) !important;
      border-radius: 6px !important;
      color: hsl(0 0% 95%) !important;
    }
  }
  .nest-menu .el-sub-menu>.el-sub-menu__title,
  .el-menu-item {
    &:hover {
      background-color: hsl(216 5% 19%) !important;
      border-radius: 6px !important;
      color: hsl(0 0% 95%) !important;
    }
  }
}

.el-menu-light{
  .sub-menu-title-noDropdown,
  .el-sub-menu__title {
    &:hover {
      background-color: rgba(0, 0, 0, 0.06) !important;
      border-radius: 6px !important;
    }
  }
  .nest-menu .el-sub-menu>.el-sub-menu__title,
  .el-menu-item {
    &:hover {
      background-color: var(--theme-light-el-menu-hover-bg) !important;
      border-radius: 6px !important;
      color: var(--theme-light-el-menu-text-color) !important;
    }
  }
}
.el-menu-item.submenu-title-noDropdown,.el-sub-menu{
  margin:0px 6px 10px 6px !important;
}
.el-menu-item{
  &:hover{
    background: var(--el-color-primary) !important;
    border-radius: 6px;
  }
  &.is-active{
    //background: var(--el-color-primary) !important;
    color: #fff !important;
    border-radius: 6px;
    position: relative;
    color: var(--el-color-primary) !important;
    &::before{
      z-index: auto;
      background-color: rgba(var(--el-color-primary-rgb), 0.1);
      content: "";
      position: absolute;
      left: 8px;
      right: 8px;
      top: 0;
      bottom: 0;
      pointer-events: none;
      border-radius: 3px;
      transition: background-color .3s , border-color .3s;
      border-right: 4px solid var(--el-color-primary);
      left: 8px;
      right: 8px;
      margin: -6px;
    }
    &:hover{
      background-color: rgb(22,119,255,0.1);
    }
  }
}

.el-menu--sub-item{
  .el-menu-item{
    margin: 0 5px 10px 5px !important;
  }
}

//card
.el-card{
  border:none !important;
  border-radius:var(--el-border-radius-base) !important;
}
.el-card.card-search__form{
  .el-card__body{
    padding-bottom: 1px !important;
  }
}

//table
.el-table th.el-table__cell{
  background: var(--el-table-th-bg) !important;
  color: var(--el-table-th-color) !important;
}

//drawer
.el-drawer__body{
padding: 0 25px !important;
}

//message-box
.el-message-box{
  border-radius: 8px !important;
}

.el-form .el-form-item__label{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  display: inline-block;
  text-align: right;
}

//segmented
.el-segmented{
  --el-segmented-bg-color:rgba(243, 243, 243, .76) !important;
  --el-segmented-item-selected-bg-color: var(--el-bg-color-overlay) !important;
  --el-segmented-item-selected-disabled-bg-color: #f2f2f2 !important;
  --el-segmented-item-selected-color: rgb(30, 30, 30) !important;
}

.dark{
  .el-segmented{
    --el-segmented-bg-color: #2f313b !important;
    --el-segmented-item-selected-bg-color: #4d4d57 !important;
    --el-segmented-item-selected-color:rgb(235, 235, 235) !important;
  }
}

.el-segmented__group {
  padding: 2px;
}

.el-segmented__item-selected {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

.el-upload{
  --el-upload-dragger-padding-horizontal: 20px !important;
}

//button
.el-button.is-plain{
  background: transparent !important;
  &:hover{
    background: transparent !important;
  }
}
.el-button--primary.is-plain:hover {
  color: var(--el-color-primary);
}

.el-button--success.is-plain:hover {
  color: var(--el-color-success);
}

.el-button--warning.is-plain:hover {

  color: var(--el-color-warning);
}

.el-button--danger.is-plain:hover {
  color: var(--el-color-danger);
}

.el-button--info.is-plain:hover {
  color: var(--el-color-info);
}

//el-input
.el-input__wrapper,.el-select__wrapper,.el-textarea__inner{
  background-color: var(--el-input-bg);
  box-shadow: none !important;
  border:.1rem transparent solid;
  //改Placeholder颜色
  &::-webkit-input-placeholder {
    color: #999999 ;
  }
  &:focus-within{
    background-color: var(--el-bg-color-overlay);
    border: 1px solid var(--el-color-primary);
  }
  &:hover{
    border: 1px solid var(--el-color-primary);
  }
}

.is-disabled{
  .el-input__wrapper,.el-select__wrapper,.el-textarea__inner{
    background-color: var(--el-input-bg) ;
    box-shadow: none !important;
    color: #333333;
    &:focus-within{
      border: 1px rgba(0,0,0,0) solid;
    }
    &:hover{
      border: 1px rgba(0,0,0,0) solid ;
    }
  }
}
.el-input-group__append{
  box-shadow: none !important;
}

.el-select__selection .el-tag{
  background-color: var(--el-bg-color-overlay);
}
.el-cascader__tags .el-tag {
  background-color: var(--el-bg-color-overlay) !important;
}

.el-message__content{
  color: var(--el-message-content-color) !important;
}
